import React from 'react'
import { Tooltip, Checkbox } from 'antd'

const getColumns = (setRecord, setOpen, handleChecked, paramsData, data) => {
  const manualColumns = [
    {
      title: '序号',
      width: 60,
      dataIndex: 'key',
      align: 'center',
      render: (_, __, index) => `${index + 1}`
    },
    {
      title: '企业名称',
      width: 120,
      dataIndex: 'ent_name',
      align: 'center',
      render: (text, record) => {
        return (
          <a
            onClick={() => {
              record.start_time = paramsData.start_time
              record.end_time = paramsData.end_time
              setRecord(record)
              setOpen(true)
            }}
          >
            {text}
          </a>
        )
      }
    },
    {
      title: '所属区县名称',
      width: 80,
      dataIndex: 'county_name',
      align: 'center'
    },
    {
      title: '重点行业类型',
      width: 80,
      dataIndex: 'industry_type_1',
      align: 'center'
    },
    {
      title: '重点行业分支',
      width: 80,
      dataIndex: 'industry_type_2',
      align: 'center'
    },
    {
      title: '其它行业分支',
      width: 80,
      dataIndex: 'industry_type_3',
      align: 'center',
      render: (v) => (v ? v : '-')
    },
    {
      title: '停限产措施',
      width: 90,
      dataIndex: 'measure_old',
      align: 'center',
      render: (v) => (v ? v : '-')
    },
    {
      title: '生产工序',
      width: 100,
      dataIndex: 'production_process',
      align: 'center',
      render: (v) => (v ? v : '-')
    },
    {
      title: '一审手工是否落实措施',
      width: 80,
      dataIndex: 'is_measure_craft',
      align: 'center'
    },
    {
      title: '一审手工未落实措施时长',
      width: 80,
      dataIndex: 'is_measure_craft_time',
      align: 'center'
    },
    {
      title: '二审手工是否落实措施',
      width: 80,
      dataIndex: 'is_second_instance',
      align: 'center',
      editable: true,
      render: (v) => (v ? v : '-')
    },
    {
      title: '二审手工未落实措施时长',
      width: 80,
      dataIndex: 'is_second_instance_time',
      align: 'center',
      editable: true,
      render: (v) => (v ? v : '-')
    },
    {
      title: '是否夜间生产',
      width: 80,
      dataIndex: 'is_night',
      align: 'center',
      editable: true
    },
    {
      title: '是否典型案例',
      width: 80,
      dataIndex: 'is_model',
      align: 'center',
      editable: true
    },
    {
      title: '此刻是否落实措施',
      width: 80,
      dataIndex: 'is_implement_now',
      align: 'center',
      editable: true
    }
  ]
  return manualColumns
}

export default getColumns
